package com.ruyuan.commodity.enums;

import com.ruyuan.commodity.open.api.model.base.message.GoodsChangeMsg;
import com.ruyuan.commodity.open.api.model.base.rabbitmq.AmqpExchange;

/**
 * 消息类型的枚举
 **/
public enum MsgTypeEnums {

    /**
     * 描述
     */
    GOODS_CHANGE_ADD_MSG(GoodsChangeMsg.ADD_OPERATION, AmqpExchange.GOODS_CHANGE, "新增商品的消息"),

    GOODS_CHANGE_UPDATE_MSG(GoodsChangeMsg.UPDATE_OPERATION, AmqpExchange.GOODS_CHANGE,"更新商品的消息"),

    GOODS_CHANGE_DELETE_MSG(GoodsChangeMsg.DEL_OPERATION, AmqpExchange.GOODS_CHANGE,"删除商品的消息"),

    GOODS_CHANGE_UNDER_MSG(GoodsChangeMsg.UNDER_OPERATION, AmqpExchange.GOODS_CHANGE,"下架商品的消息"),

    GOODS_CHANGE_REVERT_MSG(GoodsChangeMsg.REVERT_OPERATION, AmqpExchange.GOODS_CHANGE,"从回收站恢复商品的消息"),

    GOODS_CHANGE_IN_RECYCLE_MSG(GoodsChangeMsg.INRECYCLE_OPERATION, AmqpExchange.GOODS_CHANGE,"将商品放入回收站的消息"),

    GOODS_CHANGE_VERIFY_SUCCESS_MSG(GoodsChangeMsg.GOODS_VERIFY_SUCCESS, AmqpExchange.GOODS_CHANGE,"商品审核通过的消息"),

    GOODS_CHANGE_VERIFY_FAIL_MSG(GoodsChangeMsg.GOODS_VERIFY_FAIL, AmqpExchange.GOODS_CHANGE,"商品审核不通过的消息"),

    GOODS_CHANGE_PRIORITY_CHANGE_MSG(GoodsChangeMsg.GOODS_PRIORITY_CHANGE, AmqpExchange.GOODS_CHANGE,"商品优先级变更的消息"),

    /**
     * 搜索词发生变化的消息
     */
    GOODS_WORDS_CHANGE_MSG(null, AmqpExchange.GOODS_WORDS_CHANGE, ""),

    GOODS_SKU_CHANGE_MSG(null, AmqpExchange.GOODS_SKU_CHANGE, "商品SKU信息变更")


    ;

    /**
     * 消息的操作类型
     */
    private Integer operationType;
    /**
     * mq的exchange
     */
    private String exchange;
    /**
     * 消息描述
     */
    private String desc;

    MsgTypeEnums(Integer operationType, String exchange, String desc) {
        this.operationType = operationType;
        this.exchange = exchange;
        this.desc = desc;
    }

    public Integer getOperationType() {
        return operationType;
    }

    public void setOperationType(Integer operationType) {
        this.operationType = operationType;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public String getExchange() {
        return exchange;
    }

    public void setExchange(String exchange) {
        this.exchange = exchange;
    }
}
